{extend name="admin@public/main"}

{block name="button"}
<xblock>
    {if auth("$classuri/add")}
    <button class="layui-btn layui-btn-xs" data-modal='{:url("$classuri/add")}' data-title="添加用户">
        <i class="layui-icon"></i>添加歌曲
    </button>
    {/if}
    <span class="x-right" style="line-height:40px"></span>
</xblock>
{/block}

{block name="table"}
<table lay-size="sm" class="layui-table">
    <thead>
    <tr>
        <th width="10">id</th>
        <th width="50">歌曲</th>
        <th width="100">歌手</th>
        <th width="30">图片</th>
        <th width="100">试听</th>
        <th width="100">操作</th>
    </tr>
    </thead>
    <tbody>
    {volist name="list" id="vo"}
    <tr>
        <td>{$vo.id}</td>
        <td>{$vo.title}</td>
        <td>{$vo.author}</td>
        <td><a href="{$vo.pic}" target="_blank">查看</a></td>
        <td><a href="{$vo.url}" target="_blank">试听</a></td>
        <td>
            {if auth("$classuri/del")}
            <button class="layui-btn layui-btn-xs" href="javascript:;"
               data-confirm="确定要删除吗！" data-post='{:url("$classuri/del")}' data-param='ids={$vo.id}'>
                删除
            </button>
            {/if}
        </td>
    </tr>
    {/volist}
    </tbody>
</table>
{/block}

{block name="script"}
<script>

</script>
{/block}